﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DisplayBoardInfo.Server.Model
{
    public class DatabaseException : Exception
    {
        private string message;
        private Type type;

        public enum Type
        { 
            SQLException, ORMException, OtherException
        }

        /// <summary>
        /// Default exception for any database exceptions.
        /// </summary>
        /// <param name="exceptionType">Type of exception</param>
        /// <param name="message">Exception's message</param>
        public DatabaseException(Type exceptionType, string message)
        {
            this.type = exceptionType;
            this.message = message;
        }

        public override string Message
        {
            get { return message; }
        }

        public Type ExceptionType
        {
            get { return type; }
        }
    }
}
